To logout from Authelia, you have two primary methods: the Manual Portal method and the Automated Redirection method for your applications.
1. The Manual Method
The most direct way to terminate your session is to visit your Authelia portal URL directly:
- URL: https://auth.britbuzz.uk
Once there, you will see a Logout button. Clicking this clears the session cookie from your browser and tells the Authelia server to invalidate your session ID.
---
2. The Application "Logout" Link (Recommended)
If you want to add a "Logout" button to the navigation bar of your other services (like your VSCode or other proxied apps), you should link that button to the Authelia logout endpoint.
- Logout Endpoint: https://auth.britbuzz.uk/logout
You can also specify where the user should be sent after they are logged out by adding a redirection parameter:
- Redirect URL: https://auth.britbuzz.uk/logout?rd=https://google.com
---
3. Automatic Session Expiry
You can also control how long a user stays logged in before they are automatically kicked out. This is handled in your configuration.yml under the session block:
YAML
session:
# ... other settings ...
expiration: 3600 # Total time in seconds (e.g., 1 hour)
inactivity: 900 # Logout after 15 minutes of no activity
---
4. Important Note on "Single Sign-Out"
It is important to understand how the logout process works with Traefik:
- When you log out of Authelia, the Authelia session cookie is cleared.
- The next time you try to access vscode.britbuzz.uk, Traefik's forwardAuth middleware will ask Authelia if you are logged in.
- Authelia will see the cookie is gone and redirect you back to the login screen.
Note: If the application you are using (like VSCode or Nextcloud) has its own internal login system in addition to Authelia, logging out of Authelia will not necessarily log you out of the application's internal session until you refresh the page or that app's cookie expires.
Would you like me to show you how to configure a "Shortened Session" for specific sensitive subdomains while keeping longer sessions for others?